<template>
	<view>
		<view style="margin-left: 40rpx;padding: 20rpx 0;border-bottom: #d4d4d4 1rpx solid;">大连XXX有限公司</view>
		<view @click="topage('企业信息')" class="item">
			企业信息
			<u-icon name="arrow-right"></u-icon>
		</view>
		<view @click="topage('部门与成员')" class="item">
			部门与成员
			<u-icon name="arrow-right"></u-icon>
		</view>
		<view @click="topage('职务管理')" class="item">
			职务管理
			<u-icon name="arrow-right"></u-icon>
		</view>
		<view @click="topage('管理员设置')" class="item">
			管理员设置
			<u-icon name="arrow-right"></u-icon>
		</view>
		<view
			style="border-top: #e3e3e3 1rpx solid;padding-top: 20rpx; width: 100%;position: absolute;bottom: 20rpx;display: flex;justify-content: space-around;">
			<button type="default" @click="tuichu"
				style="background-color: #007AFF;color: #fff;border-radius: 20rpx;width: 43%;">退出企业</button>
			<button type="default" @click="topage('设置总经理')"
				style="background-color: #007AFF;color: #fff;border-radius: 20rpx;width: 43%;">设置总经理</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			tuichu() {
				// 调用退出企业接口

				// 成功回调
				uni.switchTab({
					url: '../../my/my'
				})
			},
			topage(a) {
				switch (a) {
					case '企业信息':
						uni.navigateTo({
							url: './administration/enterpriseInformation'
						})
						break;
					case '部门与成员':
						uni.navigateTo({
							url: './administration/department'
						})
						break;
					case '职务管理':
						uni.navigateTo({
							url: './administration/jobManagement'
						})
						break;
					case '管理员设置':
						uni.navigateTo({
							url: './administration/administrators'
						})
						break;
					case '设置总经理':
						uni.navigateTo({
							url: './administration/generalManager'
						})
						break;
				}
			}
		}
	}
</script>

<style>
	.item {
		display: flex;
		justify-content: space-between;
		align-items: center;
		text-align: end;
		padding-right: 30rpx;
		margin-left: 30rpx;
		line-height: 100rpx;
		border-bottom: #d4d4d4 1rpx solid;
	}
</style>
